package test4_15.demo01;

class test1{
    public static void main(String[] args) {

        One one = new One();

        new Thread(() -> one.getOne()).start();
        new Thread(() -> one.getTwo()).start();

    }
}


public class One {

    public synchronized void getOne(){
        System.out.println("=====1=====");
    }

    public synchronized void getTwo(){
        System.out.println("=====2=====");
    }

}
